import React from "react";
import {
  createAppContainer,
  createStackNavigator,
  createSwitchNavigator
} from "react-navigation";

import Dashboard from "../App/Dashboard";
import PatientProfile from "../App/PatientProfile";
import DoctorLogin from "../App/DoctorLogin";
import Login from "../App/Login";
import Admin from "../App/Admin";
import FetchScreen from "../App/FetchScreen";
import DoctorList from "../App/DoctorList";
import HSManDashboard from "../App/HSManDashboard";
import FetchData from "../App/FetchData";
import OPD_TabBar from "./OPD_TabBar";
import IPD_TabBar from "./IPD_TabBar";
import Discharge from "./Discharge";
import Report from "./Report";
import Search from "./Search";
<<<<<<< HEAD
import ViewPacs from "./ViewPacs";
import EmrDetails from "./EmrDetails";
import Header from "../Components/Header";
=======
>>>>>>> 503b0544130247b48d86f53bc47ed722f01e5c05

const AuthNavigation = createStackNavigator({
  Login: {
    screen: Login,
    navigationOptions: {
      header: null
    }
  },
  DoctorLogin: {
    screen: DoctorLogin,
    navigationOptions: {
      header: null
    }
  },
  Admin: {
    screen: Admin,
    navigationOptions: {
      header: null
    }
  }
});

const AppNavigation = createStackNavigator({
  Dashboard: {
    screen: Dashboard,
    navigationOptions: {
      header: null
    }
  },
  OPD_TabBar: {
    screen: OPD_TabBar,
    navigationOptions: {
      header: null
    }
  },
  IPD_TabBar: {
    screen: IPD_TabBar,
    navigationOptions: {
      header: null
    }
  },
  PatientProfile: {
    screen: PatientProfile,
    navigationOptions: {
      header: <Header isLogoutIcon={true} isBack={true} text="Profile" />
    }
  },
  Discharge: {
    screen: Discharge,
    navigationOptions: {
      header: null
    }
  },
  Report: {
    screen: Report,
    navigationOptions: {
      header: null
    }
  },
  Search: {
    screen: Search,
    navigationOptions: {
      header: <Header text="SEARCH" isBack={true} />
    }
  },
  EmrDetails: {
    screen: EmrDetails,
    navigationOptions: {
      header: null
    }
  }
});

const HousemanNav = createStackNavigator({
  Dashboard: {
    screen: HSManDashboard,
    navigationOptions: {
      header: null
    }
  },
  OPD_TabBar: {
    screen: OPD_TabBar,
    navigationOptions: {
      header: null
    }
  },
  IPD_TabBar: {
    screen: IPD_TabBar,
    navigationOptions: {
      header: null
    }
  },
  PatientProfile: {
    screen: PatientProfile,
    navigationOptions: {
      header: <Header isLogoutIcon={true} isBack={true} text="PROFILE" />
    }
  },
  Discharge: {
    screen: Discharge,
    navigationOptions: {
      header: null
    }
  },
  Report: {
    screen: Report,
    navigationOptions: {
      header: null
    }
  },
  Search: {
    screen: Search,
    navigationOptions: {
      header: <Header text="SEARCH" isBack={true} />
    }
<<<<<<< HEAD
  },
  EmrDetails: {
    screen: EmrDetails,
    navigationOptions: {
      header: null
    }
  },
  ViewPacs: {
    screen: ViewPacs,
    navigationOptions: {
      header: null
    }
=======
>>>>>>> 503b0544130247b48d86f53bc47ed722f01e5c05
  }
});

const Navigation = createSwitchNavigator(
  {
    Initial: FetchScreen,
    FetchData: FetchData,
    Houseman: HousemanNav,
    Auth: AuthNavigation,
    DoctorList: DoctorList,
    App: AppNavigation
  },
  {
    initialRouteName: "Initial"
  }
);

const AppContainer = createAppContainer(Navigation);

export default AppContainer;
